import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p002 from './p002';
import p003 from './p003';

export default async function a007(fd: IFeidaoAiBrowserComponent) {
	// todo
	const name1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="name"]').value;
	// console.log(name1);
	const res = await nodejs<Array<{}>>('notification-notice/zj-000006/s003',
		{ filter: { name: name1 } });
	if (res.length > 0) {
		render(fd, res, p001, 'p001', 'inner');
	} else {
		render(fd, '', p002, 'p002', 'inner');
	}
	// console.log(res.res1);

}
